<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns a string containing the last SQL statement error message</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.db2-stmt-error.html">« db2_stmt_error</a></li>
      <li style="float: right;"><a href="function.db2-table-privileges.html">db2_table_privileges »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.ibm-db2.html">IBM DB2 函数</a></li>
    <li>Returns a string containing the last SQL statement error message</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.db2-stmt-errormsg" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">db2_stmt_errormsg</h1>
  <p class="verinfo">(PECL ibm_db2 &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">db2_stmt_errormsg</span> &mdash; <span class="dc-title">
   Returns a string containing the last SQL statement error message
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.db2-stmt-errormsg-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>db2_stmt_errormsg</strong></span>(<span class="methodparam"><span class="type">resource</span> <code class="parameter">$stmt</code><span class="initializer"> = ?</span></span>): <span class="type">string</span></div>


  <p class="para rdfs-comment">
   Returns a string containing the last SQL statement error message.
  </p>
  <p class="para">
   If you do not pass a statement resource as an argument to
   <span class="function"><strong>db2_stmt_errormsg()</strong></span>, the driver returns the error
   message associated with the last attempt to return a statement resource,
   for example, from <span class="function"><a href="function.db2-prepare.html" class="function">db2_prepare()</a></span> or
   <span class="function"><a href="function.db2-exec.html" class="function">db2_exec()</a></span>.
  </p>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.db2-stmt-errormsg-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">stmt</code></dt>

     <dd>

      <p class="para">
       A valid statement resource.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.db2-stmt-errormsg-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns a string containing the error message and SQLCODE value for the
   last error that occurred issuing an SQL statement.
  </p>
 </div>


 

 <div class="refsect1 seealso" id="refsect1-function.db2-stmt-errormsg-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.db2-conn-error.html" class="function" rel="rdfs-seeAlso">db2_conn_error()</a> - Returns a string containing the SQLSTATE returned by the last connection attempt</span></li>
    <li class="member"><span class="function"><a href="function.db2-conn-errormsg.html" class="function" rel="rdfs-seeAlso">db2_conn_errormsg()</a> - Returns the last connection error message and SQLCODE value</span></li>
    <li class="member"><span class="function"><a href="function.db2-stmt-error.html" class="function" rel="rdfs-seeAlso">db2_stmt_error()</a> - Returns a string containing the SQLSTATE returned by an SQL statement</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>